<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
	li { border: 1px solid #000; cursor: pointer; width: 200px; display: block; }
</style>
<script src="lib/jquery-1.7.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
(function ($) {
	//定义对象函数
	$.fn.extend({
		"chgSC": function (options) {
			options = $.extend({ FontSize: "100px", Color: "red" }, options); //这里用了$.extend方法，扩展一个对象
			return this.hover(function () { //return为了保持jQuery的链式操作
				$(this).css({ "fontSize": options.FontSize, "color": options.Color });
			}, function () {
				$(this).css({ "fontSize": "", "color": "" });
			});
		}
	});
	//定义全局函数
	$.extend({
		"urlParam": function () {
			var pageUrl = location.search;
			if (pageUrl != "")
				return pageUrl.slice(1);
			else
				return "没有参数";
		}
	});
})(jQuery);
(function($){
	$.fn.extend({
		"newFunExtend":function(options){
			options = $.extend({FontSize:"100px",Color:"red"},options);
			return this.hover(function(){
				$(this).css({"fontSize":options.FontSize,"color":options.Color});
			},function(){
				$(this).css({"fontSize":"","color":""});
			});
		}
	});
})(jQuery);

$(function () {
	$("li").newFunExtend({ FontSize: "50px" });
	//alert($.urlParam());
});
</script>
</head>
<body>
	<ul>
		<li>1</li>
		<li>2</li>
		<li>3</li>
		<li>4</li>
		<li>5</li>
	</ul>
</body>
</html>